﻿<%@ Page Language="C#" MasterPageFile="~/View/Master.Master" AutoEventWireup="true" CodeBehind="AssignStationeryItems.aspx.cs" Inherits="PresentationLayer.View.DepartmentRepresentative.AssignStationeryItems" %>

<%@ Register src="../mainMenu.ascx" tagname="mainMenu" tagprefix="uc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">


     <table width="100%">
    <tr>
        <td style="height:auto;width:200px;vertical-align:top;">

            <uc1:mainMenu ID="mainMenu1" runat="server" />

        </td>
        <td>

    <div>
    <right><b><h2><u>Assign Stationery Items</u></h2></b></right>
    <br />
    <table>
    <tr>
    <td>&nbsp;</td>
    <td class="style1">&nbsp;<asp:Label ID="Label1" runat="server" Text="Item Name"></asp:Label>
        &nbsp;</td>
    <td>
        <asp:Label ID="lblName" runat="server"></asp:Label>
        </td>
    </tr>
    <tr>
    <td>&nbsp;</td>
    <td class="style1">&nbsp;<asp:Label ID="Label2" runat="server" Text="Received Qty"></asp:Label>
        &nbsp;</td>
    <td>
        <asp:Label ID="lblReceivedQty" runat="server"></asp:Label>
        </td>
    </tr>
    </table>
    <br />
    <asp:Label ID="lblError" runat="server" Text="You have already assigned Stationery items"></asp:Label>
    <table>
    <tr>
    <td>&nbsp;</td>
    <td id="gvAssignStationeryItems">
    <asp:gridview id="gvAssignStationeryItems" runat="server" autogeneratecolumns="False" 
         Width="684px" CellPadding="3" 
        ForeColor="#333333" GridLines="None" 
            onpageindexchanging="gvAssignStationeryItems_PageIndexChanging" 
            onselectedindexchanged="gvAssignStationeryItems_SelectedIndexChanged">        
        <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
     <columns>
     <asp:TemplateField>
     <HeaderTemplate>Sl No.</HeaderTemplate>
     <ItemTemplate><%# Container.DataItemIndex + 1 %></ItemTemplate>
     </asp:TemplateField>                  
     <asp:boundfield datafield="EmpName" HeaderText="employee Name"/> 
     <asp:boundfield datafield="RequestedQty" HeaderText="Requested Qty." 
             ItemStyle-HorizontalAlign="Center">                           
    <ItemStyle HorizontalAlign="Center"></ItemStyle>
         </asp:boundfield>

     <asp:TemplateField HeaderText="Assigned Qty">
     <ItemTemplate>
         <center><asp:TextBox ID="tbQty" runat="server" Height="28px" Width="50px" Text='<%# Eval("ReceivedQty") %>' /></center>
         <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="tbQty" 
         ErrorMessage="Please Enter Only Numbers"  ValidationExpression="^\d+$">
         </asp:RegularExpressionValidator>
         <asp:HiddenField ID="hdnReqFormId" runat="server" 
             Value='<%# Eval("reqFormId") %>' />
         </ItemTemplate>
     </asp:TemplateField>   
      
     <asp:boundfield datafield="OutStandingQty" headertext="Previous Pending Qty." 
             ItemStyle-HorizontalAlign="Center" >  
<ItemStyle HorizontalAlign="Center"></ItemStyle>
         </asp:boundfield>               
      <asp:TemplateField>
        <ItemTemplate>
            <asp:HiddenField ID="EmpId" runat="server" Value='<%# Eval("EmpId")%>' /> 
        </ItemTemplate>
     </asp:TemplateField>
         
     </columns>   
        <EditRowStyle BackColor="#999999" />
        <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
        <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
        <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
     </asp:gridview> 
     </td>
     </tr> 
     </table>
     <br />
     <table>
     <tr>
     <td>&nbsp;</td>
     <td>&nbsp;</td>
     <td>&nbsp;</td>
     <td>&nbsp;</td>
     <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;</td>
     <td><asp:Button ID="btnSubmit" runat="server" Text="Submit" 
             onclick="btnSubmit_Click"/></td>
     <td>&nbsp;&nbsp;&nbsp;&nbsp; </td>
     <td><asp:Button ID="btnBack" runat="server" Text="Back" Width="67px" 
             onclick="btnCancel_Click" /></td>
     </tr>
     </table>


    </div>


</td></tr></table>
</asp:Content>
